Along with the pitch shrinking in the semiconductor manufacturing, the effects of optical diffraction are becoming more and more serious. The changes of the mask layout may result in unpredictable risks. The risks of mask layout are critical in semiconductor manufacturing. In conventional, a mask layout draft is needed to be piloted run for obtaining the risk pattern and then the risk pattern is modified accordingly. However, the cost of the pilot run is quite high. Therefore, how to develop a method that can predict the risk without actual experiment is one of the important research and development directions.